Light ShadersΒΆ

Lights can contain one or more shaders. They are intended to shape the light illumination in space. For instance, you can add a Cone shader to any light which will limit the illumination to the space inside the cone.

Light Gizmos

The different types of gizmos: Box, Cone, Cylinder, Frustum and Sphere

Add a shader to a light
  1. Select the light
  2. Open the Shaders tab
  3. Select the type of shader to add (Box, Cone, Cylinder, Frustum or Sphere)
  4. Optionally, name the shader
  5. Click the Add button

Click the Add button to add a new shader to the light

Each light may have more than one shader at a time. The final light contribution is the multiplication of all shaders. for instance, a Cone shader and a Sphere shader will provide a cone spot light with a custom spherical attenuation.

A light with a cone and sphere gizmos

Light Shading Networks

Additionally, each light shader contains a shading network that you can use, to project a gobo texture for instance. Similarily, each shading network will multiply the final light contribution.

The default light shaders provided in the library have texturing abilities. To edit their values, simply open the shader tab in the properties. Also, the lights from the library are setup to contain these basic shaders.

Edit a light shader
  1. Double click a light in the browser or drag an drop a light in a window to see the list of available light shaders
  2. Double click the shader to edit its content.

Or

  1. Drag and drop the light shader from the Node List in a another window.
To properly function, light gizmos expect that the shader exposes a few inputs. For instance, the Cone gizmo requires that the shader exposes the Angle and Delta values. Check the library light shaders to see which inputs are expected by each gizmo.

Overrides with the RenderGraph

Light shaders can be dynamically added or overriden using the RenderGraph. Use the LightAttributes RenderGraph node to add or change a light shader.

The LightAttributes node overrides the PointLight.

The LightAttributes node contains a Cone shader, to override the light current Cone shader.

The lights created in the RenderGraph can also have shaders and gizmos, just as lights created in the scene graph.